using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class fundies_controls_comments_IPPage : Controls.DataManagerCommentControl
{
    protected override void ItemChanged()
    {
        if (CurrentComment != null)
        {
            mviewComments.SetActiveView(viewComment);
            lblIP.Text = Helpers.StringHelper.SafeFormat(CurrentComment.IPAddress);
            lnkWhois.NavigateUrl = Helpers.StringHelper.SafeFormat("http://ws.arin.net/whois/?queryinput={0}", CurrentComment.IPAddress);
            lnkGeo.NavigateUrl = Helpers.StringHelper.SafeFormat("http://geotool.servehttp.com/?ip={0}", CurrentComment.IPAddress);
            Iprelationship1.CurrentIPRelationship = CurrentComment.IPRelationship;
        }
        else
        {
            mviewComments.SetActiveView(viewSearch);
        }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            CurrentComment = GetItemFromQueryString();
        }
    }
}
